package com.yuyu.listener;

import org.activiti.engine.delegate.DelegateTask;
import org.activiti.engine.delegate.TaskListener;
import org.springframework.stereotype.Component;

public class BusinessTravelListener implements TaskListener{

	@Override
	public void notify(DelegateTask delegateTask) {
		System.out.println("111111");
		//根据节点ID和节点名称，指定负责人
		if(delegateTask.getName().equals("经理审批")) {
			delegateTask.setAssignee("张三");
		}else if (delegateTask.getName().equals("财务审批")) {
			delegateTask.setAssignee("李四");
		}
	}

}
